package org.example.csc.controller;

import org.example.csc.entity.Admin;
import org.example.csc.mapper.AdminMapper;
import org.example.csc.service.Adminservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AdminController {

    @Autowired
    private Adminservice adminService;

    @RequestMapping( "/admin/add")
    public boolean add(String username,String password){
        Admin admin = new Admin();
        admin.setUsername(username);
        admin.setPassword(password);

        return adminService.add(admin);
    }
    //管理员登录
    public boolean login(String username,String password) {


        return false;

    }
}
